import request from "@/utils/request";

export function getEmployeeList(query) {
  return request({
    url: "/staff/query/page",
    method: "get",
    params: query
  })
}

export function addEmployee(data) {
  console.log("data: ", data)
  return request({
    url: "/staff/add",
    method: "post",
    data: data
  })
}

export function updateEmployee(data) {
  return request({
    url: "/staff/update",
    method: "put",
    data: data
  })
}

export function deleteEmployee(deleteIds) {
  return request({
    url: "/staff/delete/",
    method: "delete",
    data: deleteIds
  })
}

export function getEmployeeById(id) {
  return request({
    url: "/staff/query/detail?staffId=" + id,
    method: "get"
  })
}
